class C:
    x = 100

    def set_x(self, v):
        self.x = v


c = C()

print(c.__dict__)  # {}  TODO 为什么？

c.set_x(250)
print(c.__dict__)  # {'x': 250}
print(c.x)  # 250
